package com.wx.service.impl;

import com.wx.entity.SysMenu;
import com.wx.entity.SysRoleMenu;
import com.wx.mapper.SysRoleMenuMapper;
import com.wx.service.SysRoleMenuService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>Title:      RoleMenuServiceImpl. </p>
 * <p>Description TODO </p>
 * <p>Copyright: Copyright (c) 2016</p>
 * <p>Company:     陕西天璇信息科技有限公司</p>
 *
 * @author         <a href="xinglinglove1029@163.com"/>杨文生</a>
 * @since      2019/8/14 22:09
 */
@Service
public class SysRoleMenuServiceImpl extends BaseServiceImpl<SysRoleMenu> implements SysRoleMenuService {

    @Resource
    private SysRoleMenuMapper roleMenuMapper;

    @Override
    public int batchDeleteByRoleId(String roleId) {
        return roleMenuMapper.batchDeleteByRoleId(roleId);
    }

    @Override
    public List<SysMenu> getMenuByRoleIds(List<String> roleIds) {
        return roleMenuMapper.getMenuByRoleIds(roleIds);
    }

    @Override
    public List<SysRoleMenu> selectRoleMenuByRoleId(String roleId) {
        return roleMenuMapper.selectRoleMenuByRoleId(roleId);
    }

    @Override
    public int batchInsert(List<SysRoleMenu> roleMenuList) {
        return roleMenuMapper.batchInsert(roleMenuList);
    }

    @Override
    public List<SysMenu> getOwnMenuModule(List<String> roleIds) {
        return roleMenuMapper.getOwnMenuModule(roleIds);
    }
}
